package com.xmuexp.e09.model;

import lombok.Data;

import java.util.Date;


@Data
public class GoodsRetVo {
    Integer id;
    String name;
    String goodsSn;
    String imageUrl;
    Integer state;
    Date gmtCreate;
    Date gmtModified;
    Boolean disabled;

    public GoodsRetVo(Goods goods){
    this.id=goods.getId();
    this.name=goods.getName();
    this.goodsSn=goods.getGoodsSn();
    this.imageUrl=goods.getImage_url();

    this.state=0;

    this.gmtCreate=goods.getGmtCreate();
    this.gmtModified=goods.getGmtModified();
    this.disabled= goods.getDisabled() == 1;
    }
}
